package pl.edu.mimuw.irs.core.model.petrinet;

import java.util.Set;

import pl.edu.mimuw.irs.core.util.Position;

/**
 * @author Jakub Rauch
 * Created on: 2009-05-07
 */
public interface INode extends IElement {
	
	// *** Properties
	
	public static final String POSITION = "Position";
	public static final String NAME = "Name";
	
	// *** Attributes
	
	// Getters and setters
	public String getName();
	public void setName(String name);
	/** Returns position of this node */
	public Position getPosition();
	/** Changes position of the node */
	public void setPosition(Position position);
	/** Returns all incoming arcs connected to this node */
	public Set<Arc> getIncomingArcs();
	/** Returns all outgoing arcs connected to this node */
	public Set<Arc> getOutgoingArcs();
	public boolean isDetached();
	public void setDetached(boolean detached);
	
	// *** Methods
	
	/** 
	 * Connects one end of an arc to the node
	 */
	public void addArc(Arc arc);
	
	/** 
	 * Disconnects arc from this node
	 */
	public void removeArc(Arc arc);
	
	/**
	 * Disconnects this node from all other elements
	 */
	public void detach();
}
